package com.kefu.robot.vo;

import javax.validation.constraints.Size;

import cn.hutool.core.bean.BeanUtil;
import com.kefu.common.context.KefuContext;
import com.kefu.common.vo.AbstractInsertVo;
import com.kefu.robot.model.RobotDocNodeItem;

import cn.hutool.core.util.IdUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * @author CodeGenerator
 * @date 2021/10/10
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@ApiModel(description = "多轮问题节点item")
public class RobotDocNodeItemInsertVo extends AbstractInsertVo<RobotDocNodeItem> {

    @ApiModelProperty(value = "节点id")
    private String nodeId;

    @ApiModelProperty(value = "指向节点id")
    private String nextNodeId;

    @ApiModelProperty(value = "名称")
    private String itemName;

    @ApiModelProperty(value = "节点类型 1=普通节点，2=跳转页面，3=转人工节点")
    private Integer itemType;

    @ApiModelProperty(value = "页面地址")
    private String pageUrl;

    @ApiModelProperty(value = "内容")
    private String itemContent;

    @Override
    public RobotDocNodeItem convert() {
        RobotDocNodeItem info = BeanUtil.toBean(this, RobotDocNodeItem.class);
        KefuContext context = KefuContext.getKefuContext();
	    info.setCreateTime(context.getNow());
	    return info;
	}
}